﻿<UserControl x:Class="Gallery.Popups.SimplePopup.SimplePopupView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:apexControls="clr-namespace:Apex.Controls;assembly=Apex"
             xmlns:SimplePopup="clr-namespace:Gallery.Popups.SimplePopup" 
             mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="800">
    
    <UserControl.DataContext>
        <SimplePopup:SimplePopupViewModel />
    </UserControl.DataContext>

    <Grid Style="{StaticResource GalleryItemStyle}">

        <apexControls:PaddedGrid Rows="Auto,Auto,*,Auto" Padding="4">

            <!-- Title section. -->
            <TextBlock Grid.Row="0" Style="{StaticResource Heading1}">SIMPLE POPUP SAMPLE</TextBlock>
            <TextBlock Grid.Row="1" Style="{StaticResource Subtitle}">
            This sample shows how a popup can be used in your application.
            </TextBlock>

            <!-- Sample zone. -->
            <Grid Row="2" Margin="16" MaxWidth="600" MaxHeight="800">

                <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                    <Button Grid.Row="2" Width="120" Height="30" Content="Show Popup" Command="{Binding ShowPopupCommand}"/>
                    <TextBlock Text="{Binding PopupResult}" HorizontalAlignment="Center" Margin="20" />
                </StackPanel>

            </Grid>
        </apexControls:PaddedGrid>
    </Grid>
</UserControl>